<template>
  <div id="demo">
    <button v-on:click="show = !show">
      Toggle
    </button>
    <transition name="fade">
      <p v-if="show">hello</p>
    </transition>
  </div>
</template>

<script>
export default {
  mounted() {
    this.show=true
  },
  data(){
    return{
      show: false
    }
  }
}

</script>

<style scoped>
.fade-enter-active, .fade-leave-active {
  transition: all .3s ease;
}
.fade-enter, .fade-leave-to /* .fade-leave-active below version 2.1.8 */ {
  transition: all .8s cubic-bezier(1.0, 0.5, 0.8, 1.0);
}
</style>
